Integrand size = 31, antiderivative size = 135 \[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=-\frac {2 B \sqrt {b \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)}}+\frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d \sqrt {b \cos (c+d x)}}+\frac {2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{d \sqrt {b \cos (c+d x)}} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {16, 2827, 2716, 2721, 2720, 2719} \[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=\frac {2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d \sqrt {b \cos (c+d x)}}+\frac {2 B \sin (c+d x)}{d \sqrt {b \cos (c+d x)}}-\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {b \cos (c+d x)}}{b d \sqrt {\cos (c+d x)}} \]
[In]
[Out]
Rule 16
Rule 2716
Rule 2719
Rule 2720
Rule 2721
Rule 2827
Rubi steps \begin{align*} \text {integral}& = b^2 \int \frac {A+B \cos (c+d x)}{(b \cos (c+d x))^{5/2}} \, dx \\ & = \left (A b^2\right ) \int \frac {1}{(b \cos (c+d x))^{5/2}} \, dx+(b B) \int \frac {1}{(b \cos (c+d x))^{3/2}} \, dx \\ & = \frac {2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{d \sqrt {b \cos (c+d x)}}+\frac {1}{3} A \int \frac {1}{\sqrt {b \cos (c+d x)}} \, dx-\frac {B \int \sqrt {b \cos (c+d x)} \, dx}{b} \\ & = \frac {2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{d \sqrt {b \cos (c+d x)}}+\frac {\left (A \sqrt {\cos (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{3 \sqrt {b \cos (c+d x)}}-\frac {\left (B \sqrt {b \cos (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{b \sqrt {\cos (c+d x)}} \\ & = -\frac {2 B \sqrt {b \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)}}+\frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d \sqrt {b \cos (c+d x)}}+\frac {2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{d \sqrt {b \cos (c+d x)}} \\ \end{align*}
Time = 0.24 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.62 \[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=\frac {2 \left (-3 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+3 B \sin (c+d x)+A \tan (c+d x)\right )}{3 d \sqrt {b \cos (c+d x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(405\) vs. \(2(171)=342\).
Time = 6.36 (sec) , antiderivative size = 406, normalized size of antiderivative = 3.01
method | result | size |
default | \(\frac {2 \sqrt {-\left (-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (2 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-12 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+6 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{3 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (4 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}\) | \(406\) |
parts | \(-\frac {2 A \left (-2 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{3 \sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}-\frac {2 B \left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{\sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}\) | \(435\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.42 \[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=\frac {-i \, \sqrt {2} A \sqrt {b} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} A \sqrt {b} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 i \, \sqrt {2} B \sqrt {b} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {2} B \sqrt {b} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, B \cos \left (d x + c\right ) + A\right )} \sqrt {b \cos \left (d x + c\right )} \sin \left (d x + c\right )}{3 \, b d \cos \left (d x + c\right )^{2}} \]
[In]
[Out]
\[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=\int \frac {\left (A + B \cos {\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{\sqrt {b \cos {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=\int { \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{2}}{\sqrt {b \cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=\int { \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{2}}{\sqrt {b \cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {b \cos (c+d x)}} \, dx=\int \frac {A+B\,\cos \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^2\,\sqrt {b\,\cos \left (c+d\,x\right )}} \,d x \]
[In]
[Out]